package com.gwtgeo.ui.shared.event;

import org.gwtopenmaps.openlayers.client.layer.Layer;

import com.google.gwt.event.shared.GwtEvent;

public class RemoveLayerEvent extends GwtEvent<RemoveLayerEventHandler>{

	public static Type<RemoveLayerEventHandler> TYPE = new Type<RemoveLayerEventHandler>();
	
	private Layer layer;
	
	public RemoveLayerEvent(Layer layer) {
		super();
		this.layer = layer;
	}

	@Override
	protected void dispatch(RemoveLayerEventHandler handler) {
		handler.onRemoveLayer(this);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<RemoveLayerEventHandler> getAssociatedType() {
		return RemoveLayerEvent.TYPE;
	}

	public Layer getLayer() {
		return layer;
	}

}
